package com.fqgj.xjd.user.dao.impl;

import com.fqgj.common.base.AbstractBaseMapper;
import com.fqgj.xjd.user.dao.UserOcrInfoDao;
import com.fqgj.xjd.user.entity.UserOcrInfoEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: zsp
 * Date: 2019-05-29
 * Time: 16:57:50.014
 */

@Repository
public class UserOcrInfoDaoImpl extends AbstractBaseMapper<UserOcrInfoEntity> implements UserOcrInfoDao {

    @Override
    public List<UserOcrInfoEntity> selectByUserCode(String userCode) {
        Map<String, Object> map = new HashMap<>();
        map.put("userCode", userCode);
        return getSqlSession().selectList(getStatement("selectByUserCode"), map);
    }

    @Override
    public int deleteByUserCode(String userCode) {
        Map<String, Object> map = new HashMap<>();
        map.put("userCode", userCode);
        return getSqlSession().update(getStatement("deleteByUserCode"), map);
    }
}